﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="Edit.aspx.cs" Inherits="PlugNT.Cms.Web.Admin.Pre_Category.Edit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>修改添加网站类别</title>
<link href="../css/control.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript">
function Trim(str) 
{
    if (typeof str == 'string') return str.replace(/(^\s*)|(\s*$)/g, '');
}
function ChkInput()
{
    if(Trim(document.getElementById("txtClassName").value)=="")
    {
        alert("类别名称不能为空！");
        document.getElementById("txtClassName").focus();
        return false;
    }
}
function SwapText()
{
    var obj=document.getElementById("DdlMenu");
    var classname=obj.options[obj.selectedIndex].text;
    var classvalue=obj.options[obj.selectedIndex].value;
    document.getElementById("spMenu").innerHTML="类别编号:"+classvalue;
}
function CheckChannel()
{
    var dmenu=document.getElementById("DdlMenu");
    var tclsname=document.getElementById("txtClassName");
    var flag=false;
    if(dmenu.options[dmenu.selectedIndex].value!=tclsname)
    {
        if(confirm("确定修改类别吗？"))
        {
            flag=true;
        }
    }
    else
    {
        flag=true;
    }
    return flag;
}
</script>
</head>
<body>
<div class="frmstatic" style="display:block">
    <span class="frmbar" style="margin:0 12px;"></span><span class="frmbar" style="margin:0 11px;"></span>
    <div class="controls">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
            <td align"left">
                <table>
                    <tr>
                        <td><img src="../images/maintenance_32x32.gif" width="16" height="16" /></td>
                        <td><label>核心 > 修改网站类别</label></td>
                    </tr>
                </table>
            </td>
            <td align="right">
                <span>操作 > </span>
                <a href='./Add.aspx'>添加新类别</a> 
                <a href='javascript:window.history.back();'>返回</a> 
            </td>
          </tr>
        </table>
    </div>
    <span class="frmbar" style="margin:0 11px;"></span><span class="frmbar" style="margin:0 12px; "></span>
</div>


<div class="frmstatic" style="display:block">
 <table width="100%" border="0" cellpadding="10" cellspacing="0">
   <tr valign="top">
    <td valign="top">
    
    <form id="form1" runat="server">
     <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#d2e6fa">
       <tr valign="top">
        <td valign="top">

          <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ecf5ff">

                <tr>
                  <td width="145" align="right" nowrap bgcolor="#F4FBFF">选择类别:</td>
                  <td width="1040" bgcolor="#F4FBFF">
                     <asp:DropDownList CssClass="select" ID="DdlMenu" runat="server" Width="160">
                     </asp:DropDownList>       
                     <asp:HiddenField ID="hidClassNo" runat="server" />   
                     <span id="spMenu"></span>          
                  </td>
                </tr>
                
                <tr>
                  <td align="right" nowrap bgcolor="#F4FBFF">类别名:</td>
                  <td width="1040" bgcolor="#F4FBFF">
                    <asp:TextBox CssClass="input" ID="txtClassName" Height="22px" runat="server" 
                          Width="158px"></asp:TextBox>(类别名用于导航及其他，推荐使用中文汉字) 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                          ErrorMessage="类别名不能为空" ControlToValidate="txtClassName"></asp:RequiredFieldValidator>             
                  </td>
                </tr>
                
                
                
                <tr>
                  <td bgcolor="#F4FBFF">&nbsp;</td>
                  <td bgcolor="#F4FBFF">
                      <asp:Button BackColor="#F4FBFF" CssClass="bt" ID="btnEdit" 
                          runat="server" Text=" 修改 " onclick="btnEdit_Click" OnClientClick="return CheckChannel();" /></td>
                </tr>
              </table>
          
        </td>
      </tr>
     </table>
    </form>

    </td>
  </tr>
 </table>
</div>
</body>
</html>
